import sys
amp_log = sys.argv[1].replace('\\','/')
result_file = sys.argv[2].replace('\\','/')
print sys.argv

def write_result(result_file, step, result):
    fd=open(result_file, "a")
    fd.write(step + ";" + result + "\n")
    fd.close()

i=1    
for line in open(amp_log):
    if "INFO  [EndPointEvents[DBAT011.0]1 - test - DBAT011.0] polling.OW_PollingProcess - Polling processUpdates for test@000000000000000/DBAT011.0 elapsed time(ms):" in line:
        poll_time = (((line.split(":"))[-1:])[0]).strip()
        write_result(result_file, str(i) +" poll time", poll_time)
        i = i + 1
        
